package com.amigo.online.message.service;

import com.amigo.online.common.param.dto.group.NewGroupDto;
import com.amigo.online.common.param.result.GroupInfo;
import com.amigo.online.common.core.response.Result;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface GroupService {

    @Transactional(transactionManager = "onlineTransactionManager", rollbackFor = Exception.class)
    GroupInfo foundTopic(NewGroupDto groupDto, Long uId);


    @Transactional(transactionManager = "onlineTransactionManager", rollbackFor = Exception.class)
    Result invitation(long groupId, List<Long> memberIds);


    @Transactional(transactionManager = "onlineTransactionManager", rollbackFor = Exception.class)
    Result quitGroup(Long groupId);

    Result dissolutionGroup(String userToken, Long topicId, long groupId);



    /**
     * 查看指定群信息
     * @param topicId
     * @return
     */
    Result selectGroupByTopicId(Long topicId);

    Result kickQuitGroup(String userToken, String topicId, long userId, long groupId);
    Result selectOwnGroup(String userId);
}
